In many cases, it is desirable to know the orientation of a camera. A digital camera, for example, could use this information to store the image such that it displays “right side up” on a computer display. Ball and cage type mechanical switches can be used to ascertain orientation, but they have reliability problems.